﻿@model IEnumerable<S4sme.Domain.Comment>
           
@{
    ViewBag.Title = "Index";
}

<h2>Category List</h2>

<table>
    <tr>
        <th>
            Content
        </th>
        <th>
            Email
        </th>
        <th>
            Author
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @item.Content
            </td>
            <td>
                @item.Email
            </td>
            <td>
                @item.Author
            </td>
            <td>
                @Html.ActionLink("Edit", "EditComment", new { id = item.Id }) |
                
                @using (Html.BeginForm("Delete", "DeleteComment", FormMethod.Post, new { style = "display:inline" })) {
                    @Html.AntiForgeryToken()
                    @Html.Hidden("id", item.Id)
                    <input type="submit" value="Delete" />
                }
            </td>
        </tr>
    }
</table>

<p>
    @Html.ActionLink("Create New", "Create")
</p>